<extend name="Common:base" />

<block name="stylesheet">
<link rel="stylesheet" href="__CSS__/list.css" />
</block>

<block name="title">
<title>用户组权限配置</title>
</block>

<block name="main-content">

    <div class="col-sm-9 col-md-10 main">
<h1>配置{$rid|get_role_name}权限</h1>
      <form method="post" action="{:U('Rbac/roleAccess')}">


<ul class="list-unstyled" id="list">
  {/* 这一级foreach处理应用结点 */}
  <foreach name="node_list" item="u">
    <li class="level_1">
    <div class="checkbox"><label><if condition="rbac_authority_on($u['id'], $role_access)"><input type="checkbox" checked="checked" name="access[]" value="{$u.id}_{$u.level}" />{$u.name}({$u.title})<else/><input type="checkbox" name="access[]" value="{$u.id}_{$u.level}" />{$u.name}({$u.title})</if></label></div>
    {/* 这一级foreach处理控制器结点 */}
    <if condition="isset($u['child'])">
      <ul class="list-inline">
        <foreach name="u.child" item="a">
          <li class="level_2">
          <div class="checkbox"><label><if condition="rbac_authority_on($a['id'], $role_access)"><input type="checkbox" checked="checked" name="access[]" value="{$a.id}_{$a.level}" />{$a.name}({$a.title})<else/><input type="checkbox" name="access[]" value="{$a.id}_{$a.level}" />{$a.name}({$a.title})</if></label></div>
          {/* 这一级foreach处理方法结点 */}
          <if condition="isset($a['child'])">
            <ul class="list-inline">
              <foreach name="a.child" item="m">
              <li class="level_3"><label class="checkbox-inline"><if condition="rbac_authority_on($m['id'], $role_access)"><input type="checkbox" checked="checked" name="access[]" value="{$m.id}_{$m.level}"> {$m.name}({$m.title})<else/><input type="checkbox" name="access[]" value="{$m.id}_{$m.level}"> {$m.name}({$m.title})</if></label></li>
              </foreach>
            </ul>
          </if>
          </li>
        </foreach>
      </ul>
    </if>
    </li>
  </foreach>
</ul>

      <input type="hidden" name="role_id" value="{$rid}" />
      <input type="submit" value="提交" />
    </form>
    </div>


</block>
